﻿using Microsoft.EntityFrameworkCore; 
using SmartCity.ProcessEngine.Domain.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SmartCity.ProcessEngine.Infrastructure
{
    /// <summary>
    /// 数据库上下文
    /// </summary>
    public class SCDBcontext : DbContext
    {
        //构造函数
        public SCDBcontext(DbContextOptions options) : base(options)
        {
        }

        //加入数据集的映射
        //public DbSet<AccountModel> AccountModels {  get; set; }//账号数据数据集
        //public DbSet<RoleModel> RoleModels {  get; set; }//角色数据集
        //public DbSet<LogModel> LogModels {  get; set; }//日志数据集
        //public DbSet<AccountRoleModel> AccountRoleModels{  get; set; }//账号角色关系数据集
        //public DbSet<DepartmentModel> DepartmentModels {  get; set; }//部门数据集

        //行业
        public DbSet<IndustryModel> IndustryModels {  get; set; }//行业数据集
                                                                 //流程类型
        public DbSet<FormCategoryModel> FormCategoryModels { get; set; }//行业数据集
        //流程表单
        public DbSet<FormModel> FormModels { get; set; }
        //流程表单明细
        public DbSet<FormFieldModel> FormFieldModels { get; set; }

        //节点
        public DbSet<NodeModel> NodeModels { get; set; }

        //节点设置
        public DbSet<FormNodeConfigModel> FormNodeConfigModels { get; set; }

        //流程实例
        public DbSet<InstanceModel> InstanceModels{ get; set; }

        //流程实例审批记录
        public DbSet<InstanceRecardModel> InstanceRecardModels { get; set; }
    }
}
